<html>
    <head>
        <title>Santya Race Server</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="/javascripts/jquery.js"></script>
        <script src="/socket.io/socket.io.js"></script>
        <script>
            $(document).on('ready', function() {
                var socket = io.connect();
                socket.emit("ready", {data:"client ready"});
                socket.on('ready-ack', function(data) {
                    console.log(data);
                });
                
                $("#but").on('click',function(e){
                    e.preventDefault();
                    $.ajax({
                        url:"http://localhost:3000/search",
                        type:"POST",
                        success:function(data){
                            console.log("AJAX Data -");
                            console.log(data);
                        }
                    });
                });
            });
        </script>
    </head>
    <body>
        <div>
            <input type="button" value="AJAX" id="but" />
        </div>
    </body>
</html>
